package com.gxnzd.communityelderly.controller;

import com.gxnzd.communityelderly.commom.R;
import com.gxnzd.communityelderly.service.PostLikeService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * ClassName: PostLikeController
 * Package: com.gxnzd.communityelderly.controller
 * Description:
 *
 * @Author 胡海峰
 * @Create 2024/11/24 15:32
 * @Version 1.0
 */
@RestController
@CrossOrigin
@RequestMapping("/postLike")
public class PostLikeController {

    @Resource
    private PostLikeService postLikeService;

    //点赞和取消点赞
    @GetMapping("/dropLike")
    public R dropLike(boolean isLike,Integer postId,Integer userId,Integer Type,Integer criticizeId){
        return postLikeService.setDropLike(isLike,postId,userId,Type,criticizeId);
    }
}
